export function debounce (time, callback) {
  let timer
  return function (newVal) {
    clearTimeout(timer)
    timer = setTimeout(() => {
      callback(newVal)
    }, time)
  }
}
